package com.hg.common.exception;

import com.hg.common.enums.ResultEnum;
import lombok.Getter;

/**
 * 校验参数异常
 * Created by skh on 2018/1/12
 */
@Getter
public class ParamException extends RuntimeException {
	private Integer code;

	public ParamException(ResultEnum resultEnum) {
		super(resultEnum.getMessage());
		this.code = resultEnum.getCode();
	}

	public ParamException(Integer code, String message) {
		super(message);
		this.code = code;
	}
}
